<template>
	<view>
		<view class="header">
			<view class="ca">
				<view @click="back" class="back">
					<image src='@/static/index/bazi/back.png'></image>
				</view>
				<view class="title">
					<slot></slot>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'backnav',
		data() {
			return {

			}
		},
		methods: {
			back() {
				let backPage = getCurrentPages()
				if (backPage.length == 1) {
					uni.navigateTo({
						url: "/pages/index/index"
					})
				} else {
					uni.navigateBack()
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.back {
		image {
			width: 19rpx;
			height: 34rpx;
		}
	}

	.header {
		background: url("../../static/index/mount1.png") no-repeat;
		background-size: 100% 100%;
		height: 176rpx;
		position: relative;
		display: flex;
		justify-content: center;

		.ca {
			display: flex;
			align-items: center;
			width: 700rpx;
			height: 80rpx;
			// background-color: #bfa;
			position: absolute;
			bottom: 0;

			.title {
				align-self: center;
				margin: 0 auto;

			}
		}
	}
</style>